<Popover Trigger="@(new AntDesign.Trigger[] { AntDesign.Trigger.Click})">
    <ChildContent>
        <div style="display: flex;height: 100%;padding: 0 10px;align-items: center; cursor: pointer;user-select: none;">
            @* <img style="box-sizing: border-box;height: 25px;width: 25px;border-radius: 50%;" src="/_content/Project.Web.Shared/assets/avator.png" /> *@
            <MIcon IconName="svg-user" ClassName="nav-menu-icon"></MIcon>
            <span style="padding-left: 6px;white-space: nowrap;">@User.UserInfo?.UserName</span>
        </div>
    </ChildContent>
    <ContentTemplate>
        <div>
            <p>登录时间: @User.UserInfo?.CreatedTime</p>
        </div>
        <Space>
            <SpaceItem>
                <Button OnClick="PasswordModifyEventCallback">修改密码</Button>
            </SpaceItem>
            <SpaceItem>
                <Button Danger Icon="logout" OnClick="@AuthenticationStateProvider.ClearState">退出</Button>
            </SpaceItem>
        </Space>
    </ContentTemplate>
</Popover>

@code {
    [Inject, NotNull] public IUserStore? User { get; set; }
    [Inject, NotNull] public IAuthenticationStateProvider? AuthenticationStateProvider { get; set; }
    [CascadingParameter(Name = "PasswordModify")] public EventCallback PasswordModifyEventCallback { get; set; }
}